/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						     respawn_point.h

	$Header: $

	$NoKeywords: $

 ************************************************************************/

#ifndef RESPAWN_POINT_H_INCLUDED
#define RESPAWN_POINT_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <iosfwd>

#include "adv_map_point.h"
#include "patrol_type.h"
#include "sized_int_types.h"
#include "town_type.h"

class t_adventure_map;

// ---------------------------------------------------------------
// A point where things might respawn during a future "month of..."
// event
// ---------------------------------------------------------------
class t_respawn_point
{
	public:
		// Normal constructor
		t_respawn_point( t_town_type						alignment,
						 int								initial_growing_experience_value,
						 int								initial_max_growth_per_day,
						 int								initial_non_growing_experience_value,
						 bool								initial_on_water,
						 t_uint8							patrol_radius,
						 t_patrol_type						patrol_type,
						 t_adv_map_point					point );

		// Read from save file constructor
		t_respawn_point( std::streambuf & stream, t_uint16 version );


		t_town_type		get_alignment() const;
		int				get_current_xp( int current_day ) const;
		bool			get_on_water() const;
		static t_uint16	get_version();
		bool			respawn( t_adventure_map & map );
		bool			write( std::streambuf & stream ) const;

	private:
	    t_town_type							m_alignment;
		int									m_initial_growing_experience_value;
		int									m_initial_max_growth_per_day;
	    int									m_initial_non_growing_experience_value;
		bool								m_initial_on_water;
		t_uint8								m_patrol_radius;
	    t_patrol_type						m_patrol_type;
		t_adv_map_point						m_point;
};

// ---------------------------------------------------------------
// t_respawn_point inline members
// ---------------------------------------------------------------

inline t_town_type t_respawn_point::get_alignment() const
{
	return m_alignment;
}

inline bool t_respawn_point::get_on_water() const
{
	return m_initial_on_water;
}

#endif // RESPAWN_POINT_H_INCLUDED
